import json
import time
from page.Page import Page
from selenium import webdriver
import pytest
from ddt import ddt,data,unpack
@ddt
class Test_tieba():
    @pytest.fixture()
    def driver(self):
        self.driver=webdriver.Edge()
        self.driver.maximize_window()
        yield self.driver
        time.sleep(2)
        self.driver.quit()
    def test_01_tieba(self):
        po=Page(self.driver)
        po.yewu_baidutieba()
        with open("./tieba.json","r",encoding="utf-8") as f:
            return json.load(f)